import request from '@/utils/request.js'

// 查询分类列表
export function listCategory(query) {
  return request({
    url: '/flow/base/category/getCategories',
    method: 'post',
    data: query
  })
}

// 查询分类详细
export function getCategory(query) {
  return request({
    url: '/flow/base/category/get',
    method: 'get',
    params: query
  })
}

// 新增/修改分类
export function saveOrUpdate(data) {
  return request({
    url: '/flow/base/category/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除分类
export function deleteCategory(id) {
  return request({
    url: '/flow/base/category/delete',
    method: 'post',
    data: [id]
  })
}